using System;
using MinimalistFoodStreet.BackEnd.Infrastructure.EFCore;
using MinimalistFoodStreet.BackEnd.Infrastructure.Dtos.Request.Tables;

namespace MinimalistFoodStreet.BackEnd.Server.Server.RequestExtend.Tables 
{
    public static class RequestCreatePromotionsDtoExtend
    {
        public static Promotion ToCreateEntity(this RequestCreatePromotionsDto dto)
        {
            return new Promotion
            {

                PGoodId = dto.goodId,
                PDiscountPrice = dto.discountPrice,
                PStartTime = dto.startTime,
                PEndTime = dto.endTime,
            };
        }
    }
}